<template>
<div>
  <el-form :model="form">
    <el-form-item  label="编号:" >
      <el-input placeholder="请输入编号" v-model="form.id" size="small"/>
    </el-form-item>
    <el-form-item  label="名称:">
      <el-input placeholder="请输入名称" v-model="form.username" size="small"/>
    </el-form-item>
    <el-form-item label="电话:">
      <el-input placeholder="请输入电话"  v-model="form.phone" size="small"/>
    </el-form-item>
  </el-form>
</div>
</template>

<script>
const axios=require('axios');
export default {
  name: "Person",
  data(){
    return{
      form:{},
      user: localStorage.getItem("user")?JSON.parse(localStorage.getItem("user")):{}
  }
  },
  create(){
    axios.get("http://localhost:9090/user/username"+this.user.username).then(resp => {
      if(resp.data.username)
      {
        this.form=resp.data;
      }
    });
  },
}
</script>

<style scoped>

</style>